package com.tz.tzgw.pc.web.model;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

public class Webcolumn {
    private Long id;
    @Min(value = 0, message = "pid必须大于-1")
    private Long pid;
    @NotEmpty(message = "名称不能为空")
    private String name;

    private Integer sort_order;
    @NotNull(message = "status不能为空")
    @Min(value = 1, message = "status必须大于0")
    private Integer status;

    private Webcolumn parent;

    private Integer level;

    private List<Webcolumn> children;

    private Integer contentable;
    @NotEmpty(message = "链接不能为空")
    private String url;

    private String module; // 新增module字段

    public Webcolumn() {}

    public Webcolumn(Long id, Long pid, String name, Integer sort_order, Integer status, Integer contentable, String url, String module) {
        this.id = id;
        this.pid = pid;
        this.name = name;
        this.sort_order = sort_order;
        this.status = status;
        this.contentable = contentable;
        this.url = url;
        this.module = module;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSort_order() {
        return sort_order;
    }

    public void setSort_order(Integer sort_order) {
        this.sort_order = sort_order;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Webcolumn getParent() {
        return parent;
    }

    public void setParent(Webcolumn parent) {
        this.parent = parent;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public List<Webcolumn> getChildren() {
        return children;
    }

    public void setChildren(List<Webcolumn> children) {
        this.children = children;
    }

    public Integer getContentable() {
        return contentable;
    }

    public void setContentable(Integer contentable) {
        this.contentable = contentable;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }
}
